import React from "react";
import { Routes, Route , Navigate} from "react-router-dom";
import NotFound from "./404";
import "./App.css";
import Login from "./components/Login";
import Main from "./components/Main";
import About from "./components/Main/About";
import Home from "./components/Main/Home";
export default function App() {
  return (
    <div>
        <Routes>
          <Route path="/login" element = {<Login/>}/>
          <Route path='/main'  element = {<Main/>}>
            <Route path="/main/about" element = {<About/>}/>
            <Route path="/main/home" element = {<Home/>}/>
          </Route>
          <Route path="/" element = {<Navigate to = '/login'/>} />
          <Route path="*" element = {<NotFound/>}/>
        </Routes>
    </div>
  );
}
